#include "model.h"
#include "chibi.h"
#include "role.h"
#include<stdbool.h>
void model_init(){
   open();
}
void model_close(){
    // freedb();
}
int  model_chibi_add(unsigned int qino,unsigned int weij,unsigned long long int weiy,unsigned int shuj,unsigned long long int shuy,unsigned int wuj,unsigned long long int wuy){
    return addChibi(qino,weij,weiy,shuj,shuy,wuj,wuy);
}
int model_chibi_update_victory(unsigned int qino,unsigned int victory){
    return chibiUpdateVictory(qino, victory);
}

int model_role_select_one_by_kv(char *key, void *val, int val_type, char *bufstr){
    return role_select_one_by_kv(key,val,val_type,bufstr);
}
int model_role_write_one_gameid_name(int gameid, char *name){
    return role_write_one_gameid_name(gameid,name);
}
int model_role_update_kv_by_gameid(char *key, void *val, int val_type, int game_id){
    return role_update_kv_by_gameid(key,val,val_type,game_id);
}

int model_account_select_one_by_kv(char *key, void *val, int val_type, char *bufstr){
    return account_select_one_by_kv(key,val,val_type,bufstr);
}
int model_account_write_one_account_pwd(char *account, char *pwd){
    return account_write_one_account_pwd(account,pwd);
}
int model_account_update_kv_by_account(char *key, void *val, int val_type, char *account){
    return account_update_kv_by_account(key,val,val_type,account);
}

int model_role_select_cols_offset(char *cols, int offset, char *bufstr){
    return role_select_cols_offset(cols,offset,bufstr);
}